console.log(__dirname);
console.log(__filename);

var filePath = "";
// var filePath = __dirname+"\\view\\ingex.html";
// var linuxFilePath = __dirname+"/view/index.html";
var path = require("path");
var str = path.join(__dirname, "/view/index.html");

var platForm = process.platform;

// nodeJS有关文件路径兼容性的解决方案
switch(platForm){
    case "win32":
        filePath = __dirname + "\\view\\index.html";
        break;
    case "linux":
        filePath = __dirname + "/view/index.html";
        break;
    default:
        console.log("操作系统未知");
        break;
}
console.log(str);